<template>
	<div class="choiceaddress">
		<div class="choice-address">
			<img class="icon-address" src="../assets/images/shouhuodizhi.png">
			<div class="nameTel" id="address">
				<div style="padding:15px 0;" v-if="show">{{address}}</div>
				<div v-else>
					<div class="elip name" style="padding-top:8px">
						<span>收货人：</span><span>{{address.name}}</span>
					</div>
					<div class="elip tel" style="padding-top:8px">
						<span>联系方式：</span><span>{{address.phone}}</span>
					</div>
					<div class="site elip" style="padding-bottom:8px;">
						收货地址：{{address.region}} {{address.address}}
					</div>
				</div>
			</div>
			<img class="icon-right" src="../assets/images/rightrow.png">
		</div>
	</div>
</template>

<script type="text/javascript">
	export default{
		name:"choiceAddress",
		props:['address','show'],
		mounted(){
			console.log(this.show)
		}
	}
</script>

<style lang="less" scoped>
	.choice-address{
		width:100%;
		background:#fff;
		.icon-address {
		    width: 20px;
		    margin: 20px 10px;
		    vertical-align: middle;
		}
		.icon-right {
		    width: 10px;
		    vertical-align: middle;
		}
		.nameTel {
		    display: inline-block;
		    width: 82%;
		    line-height: 20px;
		    vertical-align: middle;
		    color: #797979;
		    font-size:13px;
		    .name {
			    width: 38%;
			    display: inline-block;
			}
			.tel {
			    width: 55%;
			    display: inline-block;
			}
		}
	}
</style>